![]() |
DMSetMainDisplay |
||||
Header: | Displays.h | Carbon status: | Supported | |
Sets a display to be the main screen. You should generally never need to use this function.
OSErr DMSetMainDisplay ( GDHandle newMainDevice, Handle displayState );
A handle to the GDevice structure for the video device whose display you wish to make the main screen.
If your application called
A result code.
After a call to the function DMSetMainDisplay, the handle specified by the parameter newMainDevice will point to the GDevice structure for the video device whose display, before calling DMSetMainDisplay, was the main screen. To obtain a handle to the main screen, you can use the Color QuickDraw function GetMainDevice.
DMSetMainDisplay moves the menu bar to the display for the video device specified by newMainDevice. QuickDraw maps the (0,0) origin point of the global coordinate system to the main screenís upper-left corner, and other screens are positioned adjacent to it.
Because this function may move or purge memory blocks or access handles, you cannot call it at interrupt time.
Applications generally never need to use this function. In case you find a compelling need to change the userís display configuration, this function is described here for completeness. Note that if your application uses Display Manager functions to change the display configuration of the userís video devices, your application should make these changes only with the consent of the user. If your application must have a specific pixel depth, for example, it should display a dialog box that offers the user a choice between changing to that depth or canceling display of the image.
Supported in Carbon. Available in CarbonLib 1.0 and later when InterfaceLib 7.1 or later is installed. Exported by CarbonLib 1.0 and later and by InterfaceLib 7.1 and later.
© 2000 Apple Computer, Inc. — (Last Updated 3/8/2000)